Skip to content

feat: plugin marketplace of the gateway for Claude Code - #52

Open
Kaago wants to merge 1 commit into
bl0rb:mainfrom
Kaago:feat/claude-code-plugin-marketplace
Open

Kaago wants to merge 1 commit into
bl0rb:mainfrom
Kaago:feat/claude-code-plugin-marketplace

Conversation

@Kaago

@Kaago Kaago commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What

A gateway can serve a Claude Code plugin marketplace behind the same credential as the model calls. Claude Code fetches such a marketplace with a headersHelper, which has to print a JSON object of HTTP headers. KeyZapper already owns the credential, so it can provide both pieces:

  • Helper: keyzapper-helper headers --profile <UUID> prints the profile's credential as {"Authorization":"Bearer …"}. It goes through the same path as credential (https check, AllowedGatewayHosts, SSO refresh), so nothing new decides who gets a key.
  • Managed profile: an optional Marketplace dict (Name, URL) inside a ManagedProfiles entry.
  • Settings: with the profile, KeyZapper writes an extraKnownMarketplaces entry (source url, the headersHelper above, autoUpdate: true) into the project's settings.local.json and into the user settings for the default profile. It removes the entry again with the assignment, unless someone changed it since. Entries of other marketplaces are left alone.

Safety

  • A marketplace URL on another host than the profile's endpoint is not written, so the credential never leaves the gateway.
  • Nothing is written if the helper command would break Claude Code's limits for headersHelper (500 printable ASCII characters, no four spaces in a row), or for a name with characters outside [A-Za-z0-9._-].

Not in this PR

  • No field in the UI: the marketplace can only be set by IT through ManagedProfiles.
  • No drift report for the entry; "apply again" restores it.
  • The Swift sources are unchanged.
  • Claude Desktop needs no change: allowedPluginMarketplaces already fits into ClaudeDesktop › Config. The README rows say so.

Checked

  • cargo test -p keyzapper-core: 48 unit and 94 integration tests pass, three of them new (helper output, write/drop/revert of the entry next to a foreign marketplace, the managed dict).
  • desktop/scripts/l10n_check.py passes (the usage string changed).
  • Not built locally: the Tauri crate (one added line in model.rs, which copies the block from the managed profile). Not tried against a real Claude Code client.

🤖 Generated with Claude Code

A managed profile can name a Claude Code plugin marketplace that its gateway
serves behind the same credential (Marketplace: Name, URL). KeyZapper writes
it as an extraKnownMarketplaces entry next to the profile and removes it
with the assignment. The new helper command headers prints the profile's
credential as an Authorization header, which is what Claude Code expects
from a headersHelper. A marketplace on another host than the profile's
endpoint is not written, so the credential never leaves the gateway.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant